package licode.unisop.types.event.impl;

import licode.unisop.types.event.DomainEvent;
import licode.unisop.types.event.DomainEventHandler;

import java.util.ArrayList;
import java.util.List;

public class EventStoreItem {
    Class<? extends DomainEvent> cls;
    List<DomainEventHandler> deh;

    public EventStoreItem(Class<? extends DomainEvent> cls) {
        this.cls = cls;
        this.deh = new ArrayList<>();
    }

    public void addHandler(DomainEventHandler handler) {
        this.deh.add(handler);
    }

    public List<DomainEventHandler> getHandlers() {
        return deh;
    }
}
